// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) KALEIDOS INC

@use "refactor/common-refactor.scss" as deprecated;

.element-name {
  --element-name-color: var(--context-hover-color, var(--layer-row-foreground-color));
  --element-name-comp-color: var(--context-hover-color, var(--layer-row-component-foreground-color));
  --element-name-opacity: var(--context-hover-opacity, deprecated.$op-7);

  @include deprecated.textEllipsis;
  @include deprecated.bodySmallTypography;

  color: var(--element-name-color);

  flex-grow: 1;
  block-size: 100%;
  align-content: center;
  min-inline-size: var(--sp-xl);

  &.selected {
    color: var(--layer-row-foreground-color-selected);
  }

  &.type-comp {
    color: var(--element-name-comp-color);

    &.hidden {
      opacity: var(--element-name-opacity);
    }
  }

  &.hidden {
    opacity: var(--element-name-opacity);
  }
}

.element-name-input {
  --element-name-input-border-color: var(--input-border-color-focus);
  --element-name-input-color: var(--layer-row-foreground-color);

  @include deprecated.textEllipsis;
  @include deprecated.bodySmallTypography;
  @include deprecated.removeInputStyle;

  flex-grow: 1;
  height: deprecated.$s-28;
  max-inline-size: calc(var(--parent-size) - (var(--depth) * var(--layer-indentation-size)));
  margin: 0;
  padding-inline-start: deprecated.$s-6;
  border-radius: deprecated.$br-8;
  border: deprecated.$s-1 solid var(--element-name-input-border-color);
  color: var(--element-name-input-color);

  &.selected {
    min-inline-size: deprecated.$s-100;
  }
}

.element-name-touched {
  --element-name-touched-color: var(--layer-row-component-foreground-color);
  color: var(--element-name-touched-color);
}
